package org.middlewaregr.services;

import java.rmi.RemoteException;

import javax.xml.rpc.ServiceException;

public class ThesesServiceCaller {

	public static void createCommentOnProposal(int arg0, String arg1,
			String arg2, String arg3) throws Exception {
		try {
			new ThesesServceServiceLocator().getThesesServcePort()
					.createCommentOnProposal(arg0, arg1, arg2, arg3);
		} catch (RemoteException e) {
			throw new Exception(e);
		} catch (ServiceException e) {
			throw new Exception(e);
		}

	}

	public static int createTheses(String arg0, String arg1, String arg2,
			String arg3, int arg4) throws Exception {
		try {
			return (new ThesesServceServiceLocator()).getThesesServcePort()
					.createTheses(arg0, arg1, arg2, arg3, arg4);
		} catch (RemoteException e) {
			throw new Exception(e);
		} catch (ServiceException e) {
			throw new Exception(e);
		}
	}

	public static int createThesesProposal(String arg0, String arg1,
			String arg2, String arg3, String arg4, String arg5, String arg6,
			int arg7) throws Exception {
		try {
			return (new ThesesServceServiceLocator()).getThesesServcePort()
					.createThesesProposal(arg0, arg1, arg2, arg3, arg4, arg5,
							arg6, arg7);
		} catch (RemoteException e) {
			throw new Exception(e);
		} catch (ServiceException e) {
			throw new Exception(e);
		}
	}

	public static int createThesesReview(int arg0, String arg1, String arg2,
			String arg3, String arg4, String arg5, String arg6, String arg7,
			String arg8, int arg9) throws Exception {
		try {
			return (new ThesesServceServiceLocator()).getThesesServcePort()
					.createThesesReview(arg0, arg1, arg2, arg3, arg4, arg5,
							arg6, arg7, arg8, arg9);
		} catch (RemoteException e) {
			throw new Exception(e);
		} catch (ServiceException e) {
			throw new Exception(e);
		}
	}

	public static void updateProposalStatus(int arg0, String arg1)
			throws Exception {
		try {
			(new ThesesServceServiceLocator()).getThesesServcePort()
					.updateProposalStatus(arg0, arg1);
		} catch (RemoteException e) {
			throw new Exception(e);
		} catch (ServiceException e) {
			throw new Exception(e);
		}
	}

}
